import sys
import os
import mdf.debug  as debug
import mdf.config as config
import mdf.utils  as utils

class WriteUp:
	def __init( self ):
		self.title = None
		self.date = None
		self.date_extended = None
		self.category = None
		self.subcategory = None
		self.author = None
		self.article = None
		self.url = None
		self.links = None
		self.downloads = None
	
	def set_title( self, title ):
		self.title = title
	
	def set_date( self, date ):
		self.date = date
		self.date_extended = date[0]*10000+date[1]*100+date[2]
	
	def set_category( self, category ):
		self.category = category
	
	def set_subcategory( self, subcategory ):
		self.subcategory = subcategory
	
	def set_article( self, article ):
		self.article = article

	def set_url( self ):
		self.url = self.category + "/" + utils.cnv_to_name( self.title ) + ".html"

	def set_links( self, links ):
		self.links = links

